package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.provider.model.domain.AfterSale;
import com.weixing.mall.provider.model.dto.*;
import com.weixing.mall.provider.model.query.*;
import com.weixing.mall.provider.model.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单模块-售后订单表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-20
 */
public interface AfterSaleMapper extends BaseMapper<AfterSale> {
    AfterSaleRefundVo selectRefundDetails(long id);

    AfterSaleExchangeGoodsVo selectExchangeGoodsDetails(long id);

    IPage<AfterSaleVo> selectAfterSaleList(@Param("pg") Page page, @Param("qs") AfterSaleQuery afterSaleQuery, @Param("agentIds") Long[] agentIds);

    List<AfterSaleVo> selectAfterSaleList(@Param("qs") AfterSaleQuery afterSaleQuery, @Param("agentIds") Long[] agentIds);

    void afterSaleChgType(@Param("qs") AfterSaleChgTypeDto afterSaleChgTypeDto);

    void afterSaleChgProblem(@Param("qs") AfterSaleChgProblemDto afterSaleChgProblemDto);

    void afterSaleChgStatus(@Param("qs") AfterSaleChgStatusDto afterSaleChgStatusDto);

    AfterSaleOrderDetilVo selectAfterSaleOrderDetil(@Param("id") Long id);

    void afterSaleChgCustomerRemark(@Param("qs") ChgCustomerRemarkDto chgCustomerRemarkDto);

    IPage<AfterSaleProblemVo> selectAfterSaleProblemList(@Param("pg") Page page, @Param("qs") AfterSaleProblemQuery afterSaleProblemQuery);

    IPage<AfterSaleListVo> getAfterSaleList(@Param("pg") Page page, @Param("qs") AfterSaleAppQuery afterSaleAppQuery);

    AfterSaleRefoundSuccessVo selectRefundSuccess(long id);

    AfterSaleExchangeGoodsSuccessVo selectExchangeGoodsSuccess(long id);

    IPage<AppDepotAfterSaleVo> selectAppDepotAfterSaleList(@Param("pg") Page page, @Param("qs") AppDepotAfterSaleQuery appDepotAfterSaleQuery);

    AppDepotAfterSaleDetilVo selectAppDepotAfterSaleDetil(@Param("qs") AppDepotAfterSaleDetilQuery appDepotAfterSaleDetilQuery);

    AppAuditDetilVo selectAppAuditDetil(@Param("qs") ScanCodeGoodsDetilQuery scanCodeGoodsDetilQuery);

    void receive(@Param("qs") ReceiveOrderDto receiveOrderDto);

    void refuse(@Param("qs") ReceiveOrderDto receiveOrderDto);

    IPage<FrontAgentOrderVo> selectAfterSaleOrderList(@Param("pg") MPage page, @Param("qs") AfterSaleQuery query);

    StaticVo countAndSumAfterSale(@Param("qs") AfterSaleQuery query);

    IPage<AfterSaleVo> loadAfterSaleList(Page page, @Param("qs") CustomerOrderQuery query);

    StaticVo loadAfterSaleTotal(@Param("qs") CustomerOrderQuery query);
}
